package com.ylbh.modules.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylbh.common.pojo.member.dto.ExtensionCount2LevelDTO;
import com.ylbh.common.pojo.member.dto.UpgradeDTO;
import com.ylbh.common.pojo.member.dto.select.UpgradeSelectDTO;
import com.ylbh.common.pojo.member.vo.ExtensionCountVO;
import com.ylbh.common.pojo.member.vo.UpgradeExcelVO;
import com.ylbh.common.pojo.member.vo.UpgradeTypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 *
 * @author ${author}
 * @email ${email}
 * @date 2019-04-15 15:35:45
 */
@Mapper
public interface UpgradeMapper extends BaseMapper<UpgradeDTO> {
    /**
     * 消费者数据列表
     * @param params
     * @return
     */
    List<UpgradeDTO> selectUpgradeList(@Param(value = "dto") UpgradeSelectDTO dto, Page page);

    /**
     * 消费者数据列表总数
     * @param params
     * @return
     */
    Integer getUpgradeCount(UpgradeSelectDTO params);

    /**
     * 会员推广统计
     * @param params
     * @return
     */
    List<ExtensionCountVO> selectExtensionCount(UpgradeSelectDTO params);

    /**
     * 会员推广统计 二级
     * @param params
     * @return
     */
    List<ExtensionCount2LevelDTO> selectExtensionCount2Level(UpgradeSelectDTO params);

    /**
     * 会员升级导出
     * @param isPay
     * @param startTime
     * @param endTime
     */
    List<UpgradeExcelVO> upgradeExcel(@Param(value = "isPay") String isPay, @Param(value = "keywords") String keywords, @Param(value = "startTime") String startTime, @Param(value = "endTime") String endTime);

    List selectMembershipPromotionList(@Param(value = "dto") UpgradeSelectDTO dto);

    List selectMembershipPromotionsList(@Param(value = "dto") UpgradeSelectDTO dto);

    List<UpgradeTypeVO> selectUpgradeType(@Param(value = "dto") UpgradeSelectDTO dto);
}
